/**
 * 
 */
package ar.com.mun.services.impl;

import java.util.Collection;

import org.apache.commons.collections15.CollectionUtils;
import org.apache.commons.collections15.Transformer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ar.com.mun.beans.Expediente;
import ar.com.mun.daos.ExpedienteDAO;
import ar.com.mun.services.ExpedienteService;

import com.angel.architecture.services.impl.GenericServiceImpl;

/**
 * @author Guillermo Salazar
 *
 */
@Service(value = "expedienteService")
public class ExpedienteServiceImpl extends GenericServiceImpl implements ExpedienteService{

	@Autowired
	private ExpedienteDAO expedienteDAO;
	
	@Override
	public Collection<Object> findAll(){
		Collection<Expediente> a = this.getExpedienteDAO().findAll();
		Collection<Object> o = CollectionUtils.transformedCollection(a, new Transformer<Expediente, Object>(){
			public Object transform(Expediente input) {
				return input;
			}
		});
		return o;
	}

	/**
	 * @return the expedienteDAO
	 */
	public ExpedienteDAO getExpedienteDAO() {
		return expedienteDAO;
	}

	/**
	 * @param expedienteDAO the expedienteDAO to set
	 */
	public void setExpedienteDAO(ExpedienteDAO expedienteDAO) {
		this.expedienteDAO = expedienteDAO;
	}
}
